import Vue from 'vue'
import VueI18n from 'vue-i18n'
import LanguageConfig from './LanguageConfig'
import { getStorage } from '@/utils/setStorage.js';
Vue.use(VueI18n)

const locale = getStorage('language') ? getStorage('language') : 'th'
let i18n = new VueI18n({
	locale: LanguageConfig.isExist(locale) ? locale : 'th', // 语言标识
	messages: LanguageConfig.lang,
	silentTranslationWarn:true
})

export default i18n
